package gui.spectate;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class SpectateGUI extends JPanel {
	
	private JButton specBtn1 = new JButton("Spectate");
	private JButton specBtn2 = new JButton("Spectate");
	private JButton specBtn3 = new JButton("Spectate");
	private JButton specBtn4 = new JButton("Spectate");
	private JButton specBtn5 = new JButton("Spectate");
	private JButton specBtn6 = new JButton("Spectate");
	
	private JPanel panel = new JPanel(new GridLayout(6,2));

	private JLabel server1 = new JLabel("EA Clicker DeathMatch Tournament");
	private JLabel server2 = new JLabel("EA Clicker DeathMatch FreePlay");
	private JLabel server3 = new JLabel("EA Clicker Capture the Flag Tournament");
	private JLabel server4 = new JLabel("EA Racer Capture the Flag FreePlay");
	private JLabel server5 = new JLabel("EA Racer Capture the Flag Tournament");
	private JLabel server6 = new JLabel("EA Racer DeathMatch FreePlay");
	
	public SpectateGUI() {	
		spectatePanel();
	}
	
	private void spectatePanel(){
		
		specBtn1.setSize(15, 10);
		
		panel.add(specBtn1);
		panel.add(server1);
		panel.add(specBtn2);
		panel.add(server2);
		panel.add(specBtn3);
		panel.add(server3);
		panel.add(specBtn4);
		panel.add(server4);
		panel.add(specBtn5);
		panel.add(server5);
		panel.add(specBtn6);
		panel.add(server6);
		
		add(panel, BorderLayout.CENTER);
		
		specBtn1.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				//guiController.spectateMatch(server1.getText());			
			}
		});
		
		specBtn2.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				//guiController.spectateMatch(server2.getText());	
			}
		});
		
		specBtn3.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				//guiController.spectateMatch(server3.getText());
			}
		});
		
		specBtn4.addActionListener(new ActionListener() {	
			@Override
			public void actionPerformed(ActionEvent e) {
				//guiController.spectateMatch(server4.getText());
			}
		});
		
		specBtn5.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				//guiController.spectateMatch(server5.getText());
			}
		});
		
		specBtn6.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				//guiController.spectateMatch(server6.getText());
				
			}
		});
		
	}
	
	

}
